package com.benjaminwan.read.free.model.action

import com.benjaminwan.read.free.model.enums.ActionType
import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = true)
data class MouseMoveLong @JvmOverloads constructor(
    val dx: Int = 0,
    val dy: Int = 0,
    val stepXRange: IntRange? = (1..2),
    val stepYRange: IntRange? = (1..2),
    val delayRange: LongRange = (1L..2),
    override val actionType: ActionType = ActionType.MouseMoveLong
) : Action() {

    override fun toString(): String {
        val stepX = if (stepXRange != null) "$stepXRange" else "Global"
        val stepY = if (stepYRange != null) "$stepYRange" else "Global"
        return "鼠标移动距离($dx,$dy) x步进:${stepX}, y步进:${stepY}, 步进之间延时:${delayRange}"
    }
}